package spzx.mapper;

import com.atguigu.spzx.model.entity.system.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysMenuMapper {
    List<SysMenu> findByParentId(Long parentId);

    void insert(SysMenu sysMenu);

    void deleteByMenuId(Long menuId);

    List<Long> findMenuIdListByRoleId(Long roleId);

    void deleteRoleMenu(Long roleId);

    void addRoleMenu(@Param("roleId") Long roleId,@Param("menuId") Number menuId,@Param("isHalf") Number isHalf);


    List<SysMenu> findByUserIdAndParentId(@Param("userId") Long userId,@Param("parentId") Long parentId);
}
